/*
 * @Author: szx
 * @Date: 2021-12-01 13:04:24
 * @LastEditTime: 2021-12-01 13:07:36
 * @Description:
 * @FilePath: \leetcode\500-599\561\561.js
 */
var arrayPairSum = function (nums) {
    let sum = 0;
    nums.sort((a, b) => a - b);
    for (let i = 0; i < nums.length; i += 2) {
        sum += nums[i];
    }
    return sum;
};
